package leecode;

/**
 * @Classname demo
 * @Description TODO
 * @Date 2021/7/20 14:44
 * @Created by Alberthch
 *
 * i++和++i的区别
 */
public class demo {
    public static void main(String[] args) {
        int a = 5;
        int b = 5;
        while (a-- >0){
            System.out.print(a);
            System.out.print(" ");
        }

        System.out.println();
        while (--b > 0) {
            System.out.print(b);
            System.out.print(" ");
        }

        System.out.println();
        for (int i = 0; i < 5; i++) {
            System.out.print(i+" ");
        }

        System.out.println();
        for (int i = 0; i < 5; ++i) {
            System.out.print(i+" ");
        }
    }
}
